// ==UserScript== // @name 🍇 各平台的脚本支持【超星学习通】【智慧树知到】【U校园】【运动世界校园】【国家开放大学】【全国继续教育网课平台】-自动刷课和考试、字体解密--使用前请先添加作者微信:wkds1813 // @namespace 🍇 // @version 1.1.1 // @description 🍇 开发各平台脚本支持【超星学习通】【智慧树】【国家智慧中小学】【u校园】【国家开放大学】【自考教育云课堂】【职教云系列】【雨课堂系列】【讯网可过人脸】【朝明在线】【麦能网】【融学APP】【技能云】【168网校】【英华学堂系列都可】【继续教育类】【柠檬文才】【亿学宝云】【优课学堂】【清华社】【安徽继续教育】 【上海开放大学】【学历邦】【兰州继教】【继教在线】【思钮教育】【春风雨教育】【龙知网】【重庆高校】【新锦和】【中国石油大学】【尚学课堂】【新京人】【百通学堂】【点墨云】【博学】【联大】【课程伴侣】【出头科技】【良师在线】【中国大学】【在浙学】【棉花糖】【朝明在线】【学习公社】【河南宗教】【welearn随行课堂】【睿学】【兰州继教】【文鼎】【绎通云】【池馆】【utalk】【168网校】【我学习】【FIF英语】【百万扩招】【和学在线】【人卫慕课】【绎通云】【再起航】【i学】【慕享】【高校邦】【好策】【优学院】 【学起Plus】【青书学堂】【含弘慕课】【微知库】【学堂在线】自动刷课和考试。-需使用请添加微信:wkds1813 备注来意,此脚本含广告,有付费内容,介意者务下载 // @author 🍇 // @match *://*.chaoxing.com/mooc-ans/work/doHomeWorkNew* // @match *://*.chaoxing.com/work/doHomeWorkNew* // @match *://*.edu.cn/work/doHomeWorkNew* // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAAHVQTFRFR3BMgICBQD8/QUVHQ0ZIRUhKX2FiQD8/Tk1NP0VJPzs7Pz8/QD4+UE9QQD8/PVlnQD8/M6vj////n5+fN5C60NDQSl9qOXWSZL/qTFNXzOr4QWl8yMjItLS02traOIOnNZzN6OfnlJeZ9/f3PYGgpdrzmdXxgSBJqQAAABB0Uk5TAP5E6vys+7/Q0RhsfPFV/OwFarYAAAEESURBVHjapdHrboMgGIBhUHBaD/sAlTE8VOt2/5c4GlBMRZOl7w8j+kQQ0FaVwbG48IDq+piMPcgkO1bD/8DXvhD4/fb9ePDuGiqa2krV7pO1AxSLYIl2ABoeTLSvYMBi4N0sphOAlVaqg1aTPggmZYYaFvNMBYGQz6G6m2vbhEBvF81MxALFTDpbQQd3ZhvBgxqiFfBEO/CJ7ZxkNPcUbWBwn5DJw4KSsJHcHPCTLLDuQxpLkiMLbAIWJs1wBRVkyAFXT7Sa+AYQjTywNfOD74DNA18I9Ifjpg7Es/3Jj5eKyIEcBgNwhk5L8XMPonMQQcfNhBfRpIfbFbiRskCX5enFyz/07TSN9vGxKwAAAABJRU5ErkJggg== // @match *://*.asklib.com/* // @match *://*.chaoxing.com/* // @match *://*.hlju.edu.cn/* // @match *://lms.ouchn.cn/* // @match *://xczxzdbf.moodle.qwbx.ouchn.cn/* // @match *://tongyi.aliyun.com/qianwen/* // @match *://chatglm.cn/* // @match *://*.zhihuishu.com/* // @match *://course.ougd.cn/* // @match *://moodle.syxy.ouchn.cn/* // @match *://moodle.qwbx.ouchn.cn/* // @match *://elearning.bjou.edu.cn/* // @match *://whkpc.hnqtyq.cn:5678/* // @match *://study.ouchn.cn/* // @match *://www.51xinwei.com/* // @match *://*.w-ling.cn/* // @match *://xuexi.jsou.cn/* // @match *://*.edu-edu.com/* // @match *://xuexi.jsou.cn/* // @match *://spoc-exam.icve.com.cn/* // @match *://*.icve.com.cn/* // @match *://zice.cnzx.info/* // @match *://any.cnzx.info:81/* // @match *://www.icourse163.org/* // @match *://*.yuketang.cn/* // @match *://*.shou.org.cn/* // @match *://main.ahjxjy.cn/* // @match *://exam.chinaedu.net/* // @match *://degree.qingshuxuetang.com/* // @match *://cce.org.uooconline.com/* // @match *://*.courshare.cn/* // @match *://*.cep.webtrn.cn/* // @match *://*.webtrn.cn/* // @match *://*.cj-edu.com/* // @match *://*.ytccr.com/* // @match *://*.exam-cloud.cn/* // @match *://gdrtvu.exam-cloud.cn/* // @match *://*.open.ha.cn/* // @match *://lhycjy.cloudwis.tech/* // @match *://*.sclecb.cn/* // @match *://*.web2.superchutou.com/* // @match *://*.ls365.net/* // @match *://*.jijiaox.com/* // @match *://*.wencaischool.net/* // @match *://sdrz.gxk.yxlearning.com/* // @match *://*.crjxjy.net/* // @match *://*.cjnep.net/* // @match *://*.91huayi.com/* // @match *://teach.ynou.edu.cn/* // @match *://*.edu-edu.com.cn/* // @match *://*.21tb.com/* // @require https://lib.baomitu.com/vue/3.4.27/vue.global.min.js // @require https://lib.baomitu.com/vue-demi/0.14.6/index.iife.js // @require data:application/javascript,%3Bwindow.Vue%3DVue%3B // @require https://lib.baomitu.com/element-plus/2.6.3/index.full.min.js // @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-10-y/jquery/3.6.0/jquery.min.js // @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-10-y/highlight.js/11.4.0/highlight.min.js // @require https://lib.baomitu.com/markdown-it/13.0.1/markdown-it.min.js // @require https://lib.baomitu.com/dompurify/3.0.11/purify.min.js // @resource ttf https://cdn.jsdelivr.net/gh/chengbianruan/staticfile/c.json // @resource ttf2 https://cdn.jsdelivr.net/gh/chengbianruan/staticfile/1.json // @connect 127.0.0.1 // @connect icodef.com // @connect muketool.com // @connect wk66.top // @connect 82.157.105.20 // @connect tikuhai.com // @connect zhihuishu.com // @connect yuketang.cn // @connect greasyfork.org // @grant GM_addStyle // @grant GM_deleteValue // @grant GM_getResourceText // @grant GM_getValue // @grant GM_info // @grant GM_listValues // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant unsafeWindow // @run-at document-start // @antifeature payment 第三方接口存在付费项 // @license MIT // ==/UserScript== /** * 学习通 */ // 当前小节 // 确保页面中存在至少一个激活的小节元素 const activeElement = $(".posCatalog_select.posCatalog_active"); if (activeElement.length) { // 先获取所有章节标题元素的父级(假设章节标题和小节同级) const chapterTitles = $(".posCatalog_select:has(.posCatalog_title)"); // 获取章节标题之外的所有小节元素 const substantiveSiblings = $(".posCatalog_select").not(chapterTitles); // 在实质性小节中找到当前活跃小节的索引 let unitCount = substantiveSiblings.index(activeElement); // jQuery 的 .index() 方法返回值是从0开始的,如果需要从1开始计数,可以加1 unitCount += 1; // 若找不到有效的小节同级元素,则设定默认值 if (!substantiveSiblings.length || unitCount === -1) { console.warn("未找到有效的.posCatalog_select同级元素!"); unitCount = -1; } // 将结果赋值到全局作用域 window.unitCount = unitCount; } else { console.error("未找到激活的小节元素!"); } // 获取小节数量 window.unit = $(".posCatalog_level span em").length; function main() { // 尝试点击视频按钮 document.querySelector('li[title="视频"]').click(); // 等待几秒后执行视频存在性检查和其他操作 setTimeout(() => { const frameObj = $("iframe").eq(0).contents().find("iframe.ans-insertvideo-online"); const videoNum = frameObj.length; if (videoNum > 0) { console.log("%c当前小节中包含 " + videoNum + " 个视频", "color:#FF7A38;font-size:18px"); var v_done = 0; // 添加事件处理程序 addEventListener("playdone", () => { v_done++; if (v_done > videoNum) { // 下一节 } else if (v_done < videoNum) { watchVideo(frameObj, v_done) } else { console.log("%c本小节视频播放完毕,等待跳转至下一小节...", "font-size:18px"); nextUnit(); } }); // 播放 watchVideo(frameObj, v_done); } else { if (window.unitCount < window.unit) { console.log("%c当前小节中无视频,6秒后将跳转至下一节", "font-size:18px"); nextUnit(); } else { console.log("%c好了好了,毕业了", "color:red;font-size:18px"); } } }, 3000);// 3000毫秒(即3秒)后执行 } function watchVideo(frameObj, v_done) { // 添加播放事件 var playDoneEvent = new Event("playdone"); // 获取播放对象 var v = undefined; v = frameObj.contents().eq(v_done).find("video#video_html5_api").get(0); window.a = v; // 设置倍速 try { v.playbackRate = 2; } catch (e) { console.error("倍速设置失败!此节可能有需要回复内容,不影响,跳至下一节。错误信息:" + e); nextUnit(); return; } // 播放 v.play(); console.log("%c正在 " + v.playbackRate + " 倍速播放第 " + (v_done + 1) + " 个视频", "font-size:18px"); // 循环获取播放进度 window.inter = setInterval(() => { v = window.a; if (v.currentTime >= v.duration) { dispatchEvent(playDoneEvent); clearInterval(window.inter); } if (v.paused) { v.play(); } }, 1000); } function nextUnit() { console.log("%c即将进入下一节...", "color:red;font-size:18px"); setTimeout(() => { $(document).scrollTop($(document).height() - $(window).height()); $("#prevNextFocusNext").click() $(".nextChapter").eq(0).click() $("#prevNextFocusNext").click() $(".nextChapter").eq(0).click() console.log("%c行了别看了,我知道你学会了,下一节", "color:red;font-size:18px");// (已经跳转" +(++window.unitCount)+"次)"); if (window.unitCount++ < window.unit) { setTimeout(() => main(), 10000) } }, 6000); } console.log("%c 欢迎使用本脚本,此科目有%c %d %c个小节,当前为 %c第%d小节 %c-chao", "color:#6dbcff", "color:red", window.unit, "color:#6dbcff", "color:red", window.unitCount, "font-size:8px"); main();